// formPackage/components/articleItem/articleItem.js
const app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    item: {
      type: Object,
      value: {}
    }
  },

  /**
   * 组件的初始数据
   */
  data: {

  },

  /**
   * 组件的方法列表
   */
  methods: {
    articleClick() {
      let data = this.properties.item;
      if (data.type == 1) {
        //去富文本
        wx.navigateTo({
          url: '/formPackage/pages/article/richArticlePage/richArticlePage?id=' + data.id,
        })
      } else if (data.type == 3) {
        //去公众号
        app.globalData.webUrl = data.url;
        wx.navigateTo({
          url: "/pages/webViewPage/webViewPage",
        })
      }
    },
  }
})
